#pragma once

#include <string>
#include <cstdlib>
#include <exception>
#include <memory>

using namespace std;

#include "topcvt_common.hpp"
#include "topcvt_buffer.hpp"
#include "topcvt_cfg.hpp"
#include "topcvt_policycontext.hpp"

namespace topcvt
{
	class UnpackImp;
	class PackImp;
	class PolicyImp;

	typedef std::shared_ptr<UnpackImp>  UnpackImpPtr_t;
	typedef std::shared_ptr<PackImp>    PackImpPtr_t;
	typedef std::shared_ptr<PolicyImp>  PolicyImpPtr_t;

	class PolicyType
	{
	public:
		static int getPolicy(const string& policyType);
		static string getPolicy(int policyType);
	};

	class UnpackFactory
	{
	public:
		static UnpackImpPtr_t create(const string& policyType, ByteBuffer& message);
	};

	class PackFactory
	{
	public:
		static PackImpPtr_t create(const string& policyType);
	};

	class PolicyFactory
	{
	public:
		static PolicyImpPtr_t getPolicy(const string& policyType);
	};
};


